@import '@motiadev/ui/styles.css';
@import '@motiadev/ui/globals.css';
@import 'tw-animate-css';

:root {
  --tutorial-text-color: var(--dark-800);
  --tutorial-border: var(--light-1000);
  --tutorial-code-bg: rgb(24, 24, 24, 0.1);
  --tutorial-code-text: var(--text-body);
}

.dark {
  --tutorial-border: rgb(65, 65, 65);
  --tutorial-text-color: var(--light-800);
  --tutorial-code-bg: rgb(24, 24, 24, 0.4);
  --tutorial-code-text: var(--light-1000);
}

.driver-popover {
  z-index: 10000;
  width: 400px;
  max-width: 100%;
  background-color: var(--background);
  padding: 0;
  --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a), 0 4px 6px -4px var(--tw-shadow-color, #0000001a);
  box-shadow:
    var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
    var(--tw-shadow);
  display: flex;
  flex-flow: column;
  border: 1px solid var(--tutorial-border);
  border-radius: 16px;
}

.driver-popover-image {
  border-radius: 16px 16px 0 0;
}

.driver-popover-intro-step {
  max-width: 400px;
}

.popover-title {
  font-size: 18px;
  font-weight: 700;
  font-weight: var(--font-weight-600);
  line-height: 1.2;
  color: var(--text-header);
  font-family: var(--default-font-family);
}

.driver-popover-description * {
  line-height: 1.25;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--default-font-family);
}

.driver-popover-title {
  padding: 16px 16px 0 16px;
}

.driver-popover-description {
  padding: 16px;

  :not(b) {
    color: var(--tutorial-text-color);
  }

  b {
    font-weight: 800;
  }

  ul {
    list-style-type: disc;
    margin-left: 24px;

    &.no-decoration {
      list-style-type: none;
    }
    &.square-decoration {
      list-style-type: square;
      padding-left: 4px;
    }
    &.double-indented {
      margin-left: calc(var(--spacing) * 4);
    }
  }

  a {
    text-decoration: underline;
  }
}

.driver-popover-progress-text {
  color: var(--text-placeholder);
}

.tutorial-opt-out-container {
  display: flex;
  flex-flow: column;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 16px;
}

.tutorial-opt-out-button {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--default-font-family);
  background: transparent;
  border: none;
  color: var(--text-body);
  text-shadow: none;
  cursor: pointer;
}

.driver-popover-navigation-btns {
  position: relative;
  flex-grow: 0;
}

.driver-popover-navigation-btns-hint:hover:before {
  content: 'Use the right arrow key to navigate';
  position: absolute;
  color: white;
  top: -20px;
  right: 0;
  text-align: right;
  width: 180%;
  height: 100%;

  font-size: 12px;
  font-weight: 500;
  font-family: var(--default-font-family);
  color: var(--text-body);
}

.driver-popover-navigation-btns button {
  cursor: pointer;
  border-radius: 999px;
  color: white;
  font-family: var(--default-font-family);
  border: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 125%;
  letter-spacing: -0.25px;
  text-shadow: none;
  position: relative;
}

.driver-popover-btn-disabled {
  display: none;
}

.driver-popover-next-btn,
.driver-popover-next-btn:hover {
  color: white;
  padding: 16px 32px;
}

.driver-popover-next-btn {
  background-color: var(--accent-1000);
}

.driver-popover-next-btn:hover {
  background-color: var(--accent-900);
}

.driver-popover-footer {
  padding: 16px;
}

.driver-popover-arrow {
  border-width: 8px;
}

.driver-popover-arrow-side-top {
  margin-top: 1px;
  border-top-color: var(--tutorial-border);
}

.driver-popover-arrow-side-bottom {
  margin-bottom: 1px;
  border-bottom-color: var(--tutorial-border);
}

.driver-popover-arrow-side-left {
  margin-left: 1px;
  border-left-color: var(--tutorial-border);
}

.driver-popover-arrow-side-right {
  margin-right: 1px;
  border-right-color: var(--tutorial-border);
}

.code-preview {
  overflow-x: auto;
  background: var(--tutorial-code-bg);
  padding: 16px;
  border-radius: 8px;

  code {
    font-size: 14px;
    font-weight: 400;
    color: var(--tutorial-code-text);
    font-family: var(--font-dm-mono);
  }
}

.driver-popover-close-btn {
  display: none;
}
